package com.hansheng.ssdxs.presenter;

import android.util.Log;

import com.hansheng.http.result.IResult;
import com.hansheng.ssdxs.base.BasePresenter;
import com.hansheng.ssdxs.bean.TokenBean;
import com.hansheng.ssdxs.contract.MainContract;
import com.hansheng.ssdxs.http.ApiConfig;
import com.hansheng.ssdxs.http.RequestTask;

public class MainPresenter extends BasePresenter<MainContract.View> implements MainContract.Presenter {

    public MainPresenter(MainContract.View view) {
        super(view);
    }

    @Override
    public void rfToken(String token) {
        submitTask(new RequestTask<TokenBean>() {
            @Override
            public IResult<TokenBean> onBackground() {
                Log.e("D","AAAAAAA");
                return new ApiConfig<TokenBean>().rfToken(token);
            }

            @Override
            public void onSuccess(IResult<TokenBean> t) {
                Log.e("D","asdasd");
            }
        });
    }
}
